import request from "@/utils/request"
import { type Video, type Evideo } from "@/types/Video"
enum API {
    Video_base = '/video'
}
export const Add_video = (data: Video) => request({
    method: "post",
    url: API.Video_base,
    data
})
export const Get_list = (id: number) => request({
    method: "get",
    url: API.Video_base + `/${id}`,

})
export const get_one = (id: string) => request({
    method: "get",
    url: API.Video_base + `/one/${id}`
})

export const put_one = (data: Evideo) => request({
    method: 'put',
    url: API.Video_base + '/one',
    data
})

export const delete_one = (id: string) => request({
    method: "delete",
    url: API.Video_base + `/one/${id}`,
})